﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TwoWheels.Order
{
    public class Order
    {
        public Order(Dictionary<int,int> products, int KlientID)
        {
            this.KlientID = KlientID;         
            orderPositions = new LinkedList<OrderDetail>();

            foreach (KeyValuePair<int, int> product in products)
            {
                orderPositions.AddLast(new OrderDetail(product.Key, product.Value));
            }
        }

        public void chooseSupplier(int SupplierID)
        {
            this.SupplierID = SupplierID;
        }

        private DateTime orderDate; //wpisane w momencie insertu do bazy
        private int KlientID;
        private int SupplierID;
        private LinkedList<OrderDetail> orderPositions;
    }
}